Optimal. Leaf size=178 \[ -\frac {\sin (e+f x) \cos (e+f x) (d \cos (e+f x))^n \, _2F_1\left (\frac {1}{2},\frac {n+1}{2};\frac {n+3}{2};\cos ^2(e+f x)\right )}{a f \sqrt {\sin ^2(e+f x)}}+\frac {(n+1) \sin (e+f x) \cos ^2(e+f x) (d \cos (e+f x))^n \, _2F_1\left (\frac {1}{2},\frac {n+2}{2};\frac {n+4}{2};\cos ^2(e+f x)\right )}{a f (n+2) \sqrt {\sin ^2(e+f x)}}+\frac {\sin (e+f x) (d \cos (e+f x))^n}{f (a \sec (e+f x)+a)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.24, antiderivative size = 178, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 5, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {4264, 3820, 3787, 3772, 2643} \[ -\frac {\sin (e+f x) \cos (e+f x) (d \cos (e+f x))^n \, _2F_1\left (\frac {1}{2},\frac {n+1}{2};\frac {n+3}{2};\cos ^2(e+f x)\right )}{a f \sqrt {\sin ^2(e+f x)}}+\frac {(n+1) \sin (e+f x) \cos ^2(e+f x) (d \cos (e+f x))^n \, _2F_1\left (\frac {1}{2},\frac {n+2}{2};\frac {n+4}{2};\cos ^2(e+f x)\right )}{a f (n+2) \sqrt {\sin ^2(e+f x)}}+\frac {\sin (e+f x) (d \cos (e+f x))^n}{f (a \sec (e+f x)+a)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2643
Rule 3772
Rule 3787
Rule 3820
Rule 4264
Rubi steps
\begin {align*} \int \frac {(d \cos (e+f x))^n}{a+a \sec (e+f x)} \, dx &=\left ((d \cos (e+f x))^n (d \sec (e+f x))^n\right ) \int \frac {(d \sec (e+f x))^{-n}}{a+a \sec (e+f x)} \, dx\\ &=\frac {(d \cos (e+f x))^n \sin (e+f x)}{f (a+a \sec (e+f x))}-\frac {\left (d (1+n) (d \cos (e+f x))^n (d \sec (e+f x))^n\right ) \int (d \sec (e+f x))^{-1-n} (a-a \sec (e+f x)) \, dx}{a^2}\\ &=\frac {(d \cos (e+f x))^n \sin (e+f x)}{f (a+a \sec (e+f x))}+\frac {\left ((1+n) (d \cos (e+f x))^n (d \sec (e+f x))^n\right ) \int (d \sec (e+f x))^{-n} \, dx}{a}-\frac {\left (d (1+n) (d \cos (e+f x))^n (d \sec (e+f x))^n\right ) \int (d \sec (e+f x))^{-1-n} \, dx}{a}\\ &=\frac {(d \cos (e+f x))^n \sin (e+f x)}{f (a+a \sec (e+f x))}+\frac {\left ((1+n) \left (\frac {\cos (e+f x)}{d}\right )^{-n} (d \cos (e+f x))^n\right ) \int \left (\frac {\cos (e+f x)}{d}\right )^n \, dx}{a}-\frac {\left (d (1+n) \left (\frac {\cos (e+f x)}{d}\right )^{-n} (d \cos (e+f x))^n\right ) \int \left (\frac {\cos (e+f x)}{d}\right )^{1+n} \, dx}{a}\\ &=\frac {(d \cos (e+f x))^n \sin (e+f x)}{f (a+a \sec (e+f x))}-\frac {\cos (e+f x) (d \cos (e+f x))^n \, _2F_1\left (\frac {1}{2},\frac {1+n}{2};\frac {3+n}{2};\cos ^2(e+f x)\right ) \sin (e+f x)}{a f \sqrt {\sin ^2(e+f x)}}+\frac {(1+n) \cos ^2(e+f x) (d \cos (e+f x))^n \, _2F_1\left (\frac {1}{2},\frac {2+n}{2};\frac {4+n}{2};\cos ^2(e+f x)\right ) \sin (e+f x)}{a f (2+n) \sqrt {\sin ^2(e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [F] time = 0.98, size = 0, normalized size = 0.00 \[ \int \frac {(d \cos (e+f x))^n}{a+a \sec (e+f x)} \, dx \]
Verification is Not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.46, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {\left (d \cos \left (f x + e\right )\right )^{n}}{a \sec \left (f x + e\right ) + a}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (d \cos \left (f x + e\right )\right )^{n}}{a \sec \left (f x + e\right ) + a}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 2.77, size = 0, normalized size = 0.00 \[ \int \frac {\left (d \cos \left (f x +e \right )\right )^{n}}{a +a \sec \left (f x +e \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (d \cos \left (f x + e\right )\right )^{n}}{a \sec \left (f x + e\right ) + a}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {{\left (d\,\cos \left (e+f\,x\right )\right )}^n}{a+\frac {a}{\cos \left (e+f\,x\right )}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {\left (d \cos {\left (e + f x \right )}\right )^{n}}{\sec {\left (e + f x \right )} + 1}\, dx}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________